﻿<Timer OnTimeout="@OnTimeout" OnCancel="OnCancel" />
<Logger @ref="Trace" class="mt-3" />

@code {
    private Logger? Trace { get; set; }

    private Task OnTimeout()
    {
        Trace?.Log("计时器时间到");
        return Task.CompletedTask;
    }

    private Task OnCancel()
    {
        Trace?.Log("计时器取消");
        return Task.CompletedTask;
    }
}